/*
 * utils.c
 *
 *  Created on: Jun 20, 2014
 *      Author: junior
 */
#include<stdlib.h>
#include<time.h>
#include "utils.h"

/**
 * This function determines whether a new life is created. If the random number
 * generated is equal to the partner rank, then a new life can be created.
 */
bool new_life(int partner){

	int num = rand(time(NULL))%10 + 1;

	if(num == partner){
		return true;
	}
	return false;
}
